﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PrototypeZGame
{
    public class LinguisticVariables
    {
        public List<FuzzySet> sets;

        public LinguisticVariables()
        {
            sets = new List<FuzzySet>();
        }

        public void Add(FuzzySet newSet)
        {
            sets.Add(newSet);
        }

        public List<FuzzyValue> getValue(double param)
        {
            List<FuzzyValue> ret = new List<FuzzyValue>();
            double value;

            foreach(FuzzySet set in sets){
                value = set.getValue(param);
                if (value > 0)
                {
                    ret.Add(new FuzzyValue(set.name,value));
                }
            }

            return ret;
        }

    }
}
